package net.jjjshop.common.mapper.lbt;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import net.jjjshop.common.entity.lbt.LbUserWalletEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.math.BigDecimal;

/**
 * 用户钱包表 DAO 映射层
 */
@Mapper
public interface LbUserWalletMapper extends BaseMapper<LbUserWalletEntity> {


    @Select("select * from lb_user_wallet where uid= #{uid} ")
     LbUserWalletEntity getUserWalletInfo(Integer uid);


    @Select("SELECT SUM(money) from lb_user_wallet")
    BigDecimal selectTzTotal();


    /**
     * 查询市场权益卡
     * @return
     */
    @Select("SELECT SUM(score) from lb_user_wallet")
    BigDecimal selectMarketTz();
}
